from funasr import  AutoModel


model = AutoModel(model="paraformer-zh",  vad_model="fsmn-vad",  punc_model="ct-punc",
                  # spk_model="cam++",
                  )

def asr(audio):
    res = model.generate(input=audio, batch_size_s=300)
    return res[0]['text']